********************************************************************************
*
**#	Table 2: How are DV Cases Processed in DV Court?	
*		
********************************************************************************

use "${DATA}/data_DV.dta", clear

********************************************************************************
*
**##	Table 2.A: DV Case
*
********************************************************************************

# d ;

eststo clear ;
local m = 1  ;

/*	(1) */

eststo tab2_`m': 
reghdfe dismissed_retired dv_judge if dv_case ==1 , $hdfe_opts ;

	estadd ysumm				;
	estadd local cntrl	"" 		;
	local m `++m'				;
	

eststo tab2_`m': 
reghdfe dismissed_retired dv_judge $cntrls if dv_case ==1 , $hdfe_opts ;

	estadd ysumm				;
	estadd local cntrl	"X" 	;
	local m `++m'				;
	
	
/*	(2)	*/

eststo tab2_`m': 
reghdfe plea dv_judge  if dv_case ==1 , $hdfe_opts ;

	estadd ysumm				;
	estadd local cntrl	"" 		;
	local m `++m'				;
	

eststo tab2_`m': 
reghdfe plea dv_judge $cntrls if dv_case ==1 , $hdfe_opts ;

	estadd ysumm				;
	estadd local cntrl	"X" 	;
	local m `++m'				;


/*	(3)	*/

eststo tab2_`m': 
reghdfe in_trial dv_judge  if dv_case ==1 , $hdfe_opts ;
	
	estadd ysumm				;
	estadd local cntrl	"" 		;
	local m `++m'				;
	
eststo tab2_`m': 
reghdfe in_trial dv_judge $cntrls if dv_case ==1 , $hdfe_opts ;
	
	estadd ysumm				;
	estadd local cntrl	"X" 	;
	local m `++m'				;
 


esttab tab2_* using "${OUTPUT}/tab2.rtf", replace ${tab_optns} 
		keep(dv_judge)
		scalars(
			"cntrl Controls"
			"ymean Y Mean")
		title({\b Table 2. How are DV Cases Processed in DV Court? Panel A: DV Cases});

# d cr


********************************************************************************
*
**##	Table 2.B: DiD
*
********************************************************************************

# d ;
eststo clear ;
local m = 1  ;

/*	(1) */
eststo tab2_`m': 
reghdfe dismissed_retired dv_did dv_case dv_judge , $hdfe_opts ;

	estadd ysumm				;
	estadd local cntrl	"" 		;
	local m `++m'				;
	

eststo tab2_`m': 
reghdfe dismissed_retired dv_did dv_case dv_judge $cntrls , $hdfe_opts ;

	estadd ysumm				;
	estadd local cntrl	"X" 	;
	local m `++m'				;
	
	
/*	(2)	*/

eststo tab2_`m': 
reghdfe plea dv_did dv_case dv_judge , $hdfe_opts ;

	estadd ysumm				;
	estadd local cntrl	"" 		;
	local m `++m'				;
	

eststo tab2_`m': 
reghdfe plea dv_did dv_case dv_judge $cntrls , $hdfe_opts ;

	estadd ysumm				;
	estadd local cntrl	"X" 	;
	local m `++m'				;


/*	(3)	*/

eststo tab2_`m': 
reghdfe in_trial dv_did dv_case dv_judge , $hdfe_opts ;
	
	estadd ysumm				;
	estadd local cntrl	"" 		;
	local m `++m'				;
	
eststo tab2_`m': 
reghdfe in_trial dv_did dv_case dv_judge $cntrls , $hdfe_opts ;
	
	estadd ysumm				;
	estadd local cntrl	"X" 	;
	local m `++m'				;
 


esttab tab2_* using "${OUTPUT}/tab2.rtf", append ${tab_optns} 
		keep(dv_did dv_case dv_judge)
		scalars(
			"cntrl Controls"
			"ymean Y Mean")
		title( {\b Panel B: DV Cases vs All Other Cases});


# d cr  

********************************************************************************
*   End of File
********************************************************************************
